package com.longlong.mapper;

import com.longlong.domain.Student;
import com.longlong.orm.annotation.Insert;
import com.longlong.orm.annotation.Select;

import java.util.List;

public interface StudentMapper {

    @Insert("insert into student(name,age,class_id) values(#{name},#{age},#{class_id})")
    void insert(Student student);

    @Select("select * from student where id = #{id}")
    Student selectOne(Integer id);

    @Select("select * from student")
    List<Student> selectList();

}
